package me.sdau.spider.manager.modules.system.service.impl;

import me.sdau.spider.manager.modules.system.entity.Role;
import me.sdau.spider.manager.modules.system.mapper.RoleMapper;
import me.sdau.spider.manager.modules.system.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author zj
 * @date 2018/4/9 14:06
 */
@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleMapper roleMapper;

    @Override
    public Role getUserById(Long id) {
        return roleMapper.getOne(id);
    }

    @Override
    public int insertRole(Role role) {
        return roleMapper.insert(role);
    }

    @Override
    public int insertRoleMenu(Role role) {
        return roleMapper.insertRoleMenu(role);
    }
}
